home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / General / MM3MCp.sea Folder / Made by Marksman / Sources / mm / mmModelessDialogObject.cp < prev    next >
Encoding:
Text File  |  1994-01-16  |  1.6 KB  |  68 lines  |  [TEXT/MMCC]

  1. /*  mmModelessDialogObject                 */
  2. /*  Copyright © 1994 George R. Cossey */
  3.  
  4. /*    File name:  mmModelessDialogObject
  5.     Function:  Basic modeless dialog object
  6.  
  7.     History: 1/16/94 Original by George Cossey
  8.  
  9. */
  10.  
  11. #include "mmCommonMM_Demo.h"    /* Common */
  12. #include "CommonMM_Demo.h"        /* Common */
  13.  
  14.  
  15. /* ======================================================= */
  16. /* ======================================================= */
  17.  
  18. void CmmModelessDialog::Init()
  19. {
  20.  
  21. inherited::Init();
  22.  
  23. this->theWindow = nil;
  24. this->ExitDialog = false;
  25. /* Expected to be overridden by the window code */
  26. }
  27.  
  28. /* ======================================================= */
  29.  
  30. /* Routine: Moved */
  31. /* Purpose: We were moved, possibly to another screen and screen depth */
  32.  
  33. void CmmModelessDialog::Moved(Rect *OldRect,WindowPtr theWindow)/* Moved this window */
  34. {
  35. WindowPtr    SavePort;                                /* Place to save the last port */
  36.  
  37.  
  38. if (this->theWindow == theWindow)                /* Only do if the window is us */
  39.     {
  40.     GetPort(&SavePort);                            /* Save the current port */
  41.     SetPort(theWindow);                            /* Set the port to my window */
  42.  
  43.  
  44.     SetPort(SavePort);                            /* Restore the old port */
  45.     }
  46. }
  47.  
  48. /* ======================================================= */
  49.  
  50. void CmmModelessDialog::OpenExtras()
  51. {
  52. }
  53.  
  54. /* ======================================================= */
  55.  
  56. void CmmModelessDialog::UpdateExtras()
  57. {
  58. }
  59.  
  60. /* ======================================================= */
  61.  
  62. void CmmModelessDialog::FilterTheHit(short *itemHit,EventRecord *myEvent)
  63. {
  64. }
  65.  
  66. /* ======================================================= */
  67. /* ======================================================= */
  68.